package com.vhall.component.controller.upload;


import com.vhall.component.entity.upload.vo.ConsoleUploadVo;
import com.vhall.component.entity.upload.vo.DocUploadVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;


/**
 * 数据上传
 *
 * @author yongzheng.xu
 * @date 2021/5/26 17:59
 */
@FeignClient(value = "UploadFacade", path = "/v4/upload")
public interface UploadFacade {


    /**
     * console端-聊天图片上传
     *
     * @param vo 参数
     * @return 图片上传后地址
     */
    @PostMapping("/images")
    String imageUpload(@Validated ConsoleUploadVo vo);

    /**
     * admin端-图片上传
     *
     * @param vo 参数
     * @return 图片上传后地址
     */

    @PostMapping("/admin/images")
    String imageUploadAdmin(ConsoleUploadVo vo);

    /**
     * 聊天图片上传
     *
     * @param vo file
     * @return 文档信息
     */
    @PostMapping("/docs")
    Object docUpload(DocUploadVO vo);
}
